package org.needcoke.hs.mp.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

@Data
public class BaseConfig {

    /**
     * 签名连接符
     */
    @TableField(value = "`connector_between_two_group`")
    private String connectorBetweenTwoGroup;

    /**
     * name 和 key 之间的连接符
     */
    @TableField(value = "`connector_between_name_and_value`")
    private String connectorBetweenNameAndValue;

    /**
     * 排序算法
     */
    @TableField(value = "`sorted_function`")
    private String sortedFunction;

    /**
     * 是否拼接表单类型的参数   --- 不含文本类型
     */
    @TableField(value = "`not_with_form_body`")
    private boolean doNotWithFormBody;

    /**
     * 签名放在什么位置
     * <p>
     * 0   ---   header
     * <p>
     * 1   ---    parameter
     */
    @TableField(value = "`signature_field`")
    private String signatureField;

    /**
     * 默认的签名算法
     */
    @TableField(value = "`sign_algorithm`")
    private String signAlgorithm;

    /**
     * 签名算法
     */
    @TableField(value = "`sign_function`")
    private String signFunction;

    /**
     * 签名编码
     */
    @TableField(value = "`sign_code`")
    private String signCode;

    /**
     * 签名的名称
     */
    @TableField(value = "`signature_name`")
    private String signatureName;

    /**
     * 需要拼接的指定串
     */
    @TableField(value = "`proof`")
    private String proof;

    @TableField(value = "`proof_before`")
    private boolean proof_before;

    /**
     * 是否需要拼接 application/json   application/xml等类型的body
     */
    @TableField(value = "`not_with_application_body`")
    private boolean doNotWithApplicationBody;

    @TableField(value = "`connector_between_body_and_param`")
    protected String connectorBetweenBodyAndParam = "";

    @TableField(value = "`body_before`")
    protected boolean bodyBefore = false;

    @TableField(value = "`prefix`")
    protected String prefix = "";

    @TableField(value = "`suffix`")
    protected String suffix = "";

    @TableField(value = "`around`")
    protected String around = "";

    /**
     * 采用秘钥型加密算法签名的秘钥
     * <p>
     * 例如:
     * <p>
     * ---- RSA/RSA2加密算法的私钥
     */
    @TableField(value = "`sign_key`")
    protected String signKey = "";
}
